<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>商品列表 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel=stylesheet type="text/css"  href="file/css/general.css">
<link rel=stylesheet type="text/css"  href="file/css/main.css">
<script type="text/javascript"  src="file/js/jquery-1.7.2.js"></script>
</head>
<body>

<h1>
<span class="action-span"><a href="goods.php?act=add">添加新商品</a></span>
<span class="action-span1"><a href="index.php?act=main">产品管理中心</a> </span><span id="search_id" class="action-span1"> - 商品列表 </span>
<div style="clear:both"></div>
</h1>
<!-- 商品搜索 -->
<!-- $Id: goods_search.htm 16790 2009-11-10 08:56:15Z wangleisvn $ -->
<div class="form-div">
  <form action="admin.php?con=Products&act=PushProdut" name="searchForm" method="post">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <!-- 大类 -->
    <select name="bcat_id" id="BCat" style="margin-right:30px;">
		<option value="0">所有分类</option>
		<?php
		if(isset( $bcat )){
			foreach( $bcat as $key =>$value){
			?>
			<option value="<?php echo $value['TId']; ?>" ><?php echo $value['TName']; ?></option>
			<?php 
			}
		}
		 ?>
		
		
	</select>
	
	<!-- 根据产品的大类查询产品小类  -->
		  <script type="text/javascript">
		  	$(function(){
				$('#BCat').change(function(){
					var TId	= $(this).val();
					$.ajax({
					url : 'Admin.php?con=Products&act=getSCat',
					type: 'GET',
					data: '&TId='+TId,
					error: function(data){
						alert('error');
					},
					success: function(data){
					     //alert(data);
						$('#SCat').html(data);

					}
});
				
				});
			});
		  
		  </script>
	<!-- 小类 -->
		 <select name="scat_id" id="SCat" style="margin-right:30px;">
		 	<option>请选择小类型</option>
		 </select>
	<!-- 根据产品小类获得产品品牌-->
	 <script type="text/javascript">
		  	$(function(){
				$('#SCat').change(function(){
					var TId	= $(this).val();
					$.ajax({
					url : 'Admin.php?con=Products&act=getBrand',
					type: 'GET',
					data: '&TId='+TId,
					error: function(data){
						alert('error');
					},
					success: function(data){
					//alert(data);
						$('#Brand').html(data);

					}
});
				
				});
			});
		  
		  </script>
    <!-- 品牌 -->
    <select name="brand_id"  id="Brand" style="margin-right:30px;">
		<option>请选择品牌</option>
	</select>
   <br />
   
   <p>
   消费层次：
   <?php
   	if(isset($levels)){
		foreach( $levels  as $key=>$value){
		?>
		<input type="checkbox" name="level[]"  value="<?php echo $value['DId']; ?>"/><span style="color:#333"><?php echo  $value['DValue']; ?></span>
		<?PHP
		}
	}
    ?>
</p>
	<p>	
	适合年龄段：
	<?PHP 
	if(isset($age)){
				foreach( $age  as $key=>$value){
				?>
				
				<input type="checkbox" name="age[]"  value="<?php echo $value['DId']; ?>"/><span style="color:#333"><?php echo  $value['DValue']; ?></span>
				<?php
				}
	}
	?>
</p>
<p>
	适用性别：
	<?php 
	if(isset($sex)){
				foreach( $sex  as $key=>$value){
				?>
				<input type="checkbox" name="sex[]"  value="<?php echo $value['DId']; ?>"/><span style="color:#333"><?php echo  $value['DValue']; ?></span>
				
				<?php
				}
	}
	
	?>
   </p>
   
        
    <input type="submit" value=" 搜索 " class="button" />
  </form>
</div>
<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="#">编号</a><img src="images/sort_desc.gif"/></th>
    <th><a href="#">商品名称</a></th>
    <th><a href="#">商品大类型</a></th>
    <th><a href="#">商品小类型</a></th>
	<th><a href="#">商品品牌</a></th>
    <th><a href="#">商品价格</a></th>
    <th>操作</th>
  </tr>
  <?php  
  if( isset( $array)){
  foreach( $array as $key => $value){
  		?>
	<tr>
    <td><input type="checkbox" name="checkboxes[]" value="32" /><?php echo $key; ?></td>
    <td class="first-cell"><?php echo $value['productName']; ?></td>
    <td align="center"><?php echo $value['BCat']; ?><span class="BCat"></span></td>
    <td align="center"><?php echo $value['SCat']; ?></td>
    <td align="center"><?php echo $value['Brand']; ?></td>
	<td align="center"><?php echo $value['Price']; ?></td>
    <td align="center">
      
      <a href="admin.php?con=Products&act=showAddProduct&pid=<?php echo $key;?>" title="编辑"><img src="file/img/icon_edit.gif" width="16" height="16" border="0" /></a>
      <a href="admin.php?con=Products&act=deleteProduct&pid=<?php echo $key; ?>" onclick="listTable.remove(32, '您确实要把该商品放入回收站吗？')" title="删除"><img src="file/img/icon_trash.gif" width="16" height="16" border="0" /></a>
      <a href="goods.php?act=product_list&goods_id=32" title="货品列表"><img src="file/img/icon_docs.gif" width="16" height="16" border="0" /></a>          </td>
  </tr>	
		<?php 
		
		}
  }
  
  ?>
   
   
   
   
  </table>
<!-- end goods list -->

<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
          <!-- $Id: page.htm 14216 2008-03-10 02:27:21Z testyang $ -->
            <div id="turn-page">
        总计  <span id="totalRecords">22</span>
        个记录分为 <span id="totalPages">2</span>
        页当前第 <span id="pageCurrent">1</span>
        页，每页 <input type='text' size='3' id='pageSize' value="15" onkeypress="return listTable.changePageSize(event)" />
        <span id="page-link">
          <a href="javascript:listTable.gotoPageFirst()">第一页</a>
          <a href="javascript:listTable.gotoPagePrev()">上一页</a>
          <a href="javascript:listTable.gotoPageNext()">下一页</a>
          <a href="javascript:listTable.gotoPageLast()">最末页</a>
          <select id="gotoPage" onchange="listTable.gotoPage(this.value)">
            <option value='1'>1</option><option value='2'>2</option>          </select>
        </span>
      </div>
    </td>
  </tr>
</table>

</div>
</form>
<div id="footer">
共执行 7 个查询，用时 0.039584 秒，Gzip 已禁用，内存占用 3.227 MB<br />
版权所有 &copy; 2005-2012 上海商派网络科技有限公司，并保留所有权利。</div>
<!-- 新订单提示信息 -->
<div id="popMsg">
  <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#cfdef4" border="0">
  <tr>
    <td style="color: #0f2c8c" width="30" height="24"></td>
    <td style="font-weight: normal; color: #1f336b; padding-top: 4px;padding-left: 4px" valign="center" width="100%"> 新订单通知</td>
    <td style="padding-top: 2px;padding-right:2px" valign="center" align="right" width="19"><span title="关闭" style="cursor: hand;cursor:pointer;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick="Message.close()" >×</span><!-- <img title=关闭 style="cursor: hand" onclick=closediv() hspace=3 src="msgclose.jpg"> --></td>
  </tr>
  <tr>
    <td style="padding-right: 1px; padding-bottom: 1px" colspan="3" height="70">
    <div id="popMsgContent">
      <p>您有 <strong style="color:#ff0000" id="spanNewOrder">1</strong> 个新订单以及       <strong style="color:#ff0000" id="spanNewPaid">0</strong> 个新付款的订单</p>
      <p align="center" style="word-break:break-all"><a href="order.php?act=list"><span style="color:#ff0000">点击查看新订单</span></a></p>
    </div>
    </td>
  </tr>
  </table>
</div>

</body>
</html>